<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        var date21 = new Date('2020/02/17 21:00:00');
        console.log(date21);
        var date22 = new Date(2020, 2, 18); // 第二个参数返回的是三月，不是二月
        console.log(date22);
        var date23 = new Date(2020, 3, 18, 22, 59, 58);
        console.log(date23);
        var date24 = new Date('2020/04/19'); // 返回的就是四月
        console.log(date24);
        var date25 = new Date('2020-05-20');
        console.log(date25);
        var date26 = new Date('Wed Jan 27 2017 12:00:00 GMT+0800 (中国标准时间)');
        console.log(date26);
    </script>
</body>

</html>